package com.dl698.buss;

/**
 * 链路选项类
 * 封装链路层配置信息
 * 
 * @author wind
 * @version 1.1.1
 */
public class LinkOption {

    private String serverAddress;
    private String clientAddress;
    private boolean enableSecurity;
    private int frameSequence;

    /**
     * 默认构造函数
     */
    public LinkOption() {
    }

    /**
     * 构造函数
     * 
     * @param serverAddress 服务器地址
     * @param clientAddress 客户端地址
     */
    public LinkOption(String serverAddress, String clientAddress) {
        this.serverAddress = serverAddress;
        this.clientAddress = clientAddress;
    }

    /**
     * 获取服务器地址
     * 
     * @return 服务器地址
     */
    public String getServerAddress() {
        return serverAddress;
    }

    /**
     * 设置服务器地址
     * 
     * @param serverAddress 服务器地址
     */
    public void setServerAddress(String serverAddress) {
        this.serverAddress = serverAddress;
    }

    /**
     * 获取客户端地址
     * 
     * @return 客户端地址
     */
    public String getClientAddress() {
        return clientAddress;
    }

    /**
     * 设置客户端地址
     * 
     * @param clientAddress 客户端地址
     */
    public void setClientAddress(String clientAddress) {
        this.clientAddress = clientAddress;
    }

    /**
     * 是否启用安全
     * 
     * @return true如果启用安全
     */
    public boolean isEnableSecurity() {
        return enableSecurity;
    }

    /**
     * 设置是否启用安全
     * 
     * @param enableSecurity 是否启用安全
     */
    public void setEnableSecurity(boolean enableSecurity) {
        this.enableSecurity = enableSecurity;
    }

    /**
     * 获取帧序列号
     * 
     * @return 帧序列号
     */
    public int getFrameSequence() {
        return frameSequence;
    }

    /**
     * 设置帧序列号
     * 
     * @param frameSequence 帧序列号
     */
    public void setFrameSequence(int frameSequence) {
        this.frameSequence = frameSequence;
    }
}